package com.hqd.ch03.v50.beans.factory.support;

import com.hqd.ch03.v50.beans.BeansException;
import com.hqd.ch03.v50.factory.BeanFactory;
import com.hqd.ch03.v50.factory.support.RootBeanDefinition;

import java.lang.reflect.Constructor;
import java.lang.reflect.Method;

public interface InstantiationStrategy {

    Object instantiate(RootBeanDefinition bd, String beanName, BeanFactory owner)
            throws BeansException;

    Object instantiate(RootBeanDefinition bd, String beanName, BeanFactory owner,
                       Constructor<?> ctor, Object... args) throws BeansException;

    Object instantiate(RootBeanDefinition bd, String beanName, BeanFactory owner,
                       Object factoryBean, Method factoryMethod, Object... args)
            throws BeansException;

}

